// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_PLAN_ORDER_ITEM
// * CreateDate    : 2012/4/21 16:51:07
// * Creater       : CodeSmith
// * LastChangeDate: 2012/4/21 16:51:07
// * LastChanger   : 2012/4/21 16:51:07
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class ProdPlanOrderItemEntity : EntityBase
    {
        public ProdPlanOrderItemTable TableSchema
        {
            get
            {
                return ProdPlanOrderItemTable.Current;
            }
        }

        public ProdPlanOrderItemEntity()
        {

        }

        public ProdPlanOrderItemEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.PlanOrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ITEM_ID"]));
            this.PlanOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ID"]));
            this.BomId = Convert.ToString(CommonFunctions.ToObject(dr["BOM_ID"]));
            this.RelatedPlanOrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_PLAN_ORDER_ITEM_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.BlueprintId = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_ID"]));
            this.TechnicPerson = Convert.ToString(CommonFunctions.ToObject(dr["TECHNIC_PERSON"]));
            this.OrderItemCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ITEM_CODE"]));
            this.DeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_DATE"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.StorageQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["STORAGE_QTY"]));
            this.ProductedQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRODUCTED_QTY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.ProductType = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE"]));
            this.WorkorderCreateDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["WORKORDER_CREATE_DATE"]));
            this.OrderType = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_TYPE"]));
            this.IsAssembly = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ASSEMBLY"]));
            this.IsPrinted = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_PRINTED"]));
            this.IsMark = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_MARK"]));
        }

        public ProdPlanOrderItemEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.PlanOrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ITEM_ID"]));
            this.PlanOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ID"]));
            this.BomId = Convert.ToString(CommonFunctions.ToObject(dr["BOM_ID"]));
            this.RelatedPlanOrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_PLAN_ORDER_ITEM_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.BlueprintId = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_ID"]));
            this.TechnicPerson = Convert.ToString(CommonFunctions.ToObject(dr["TECHNIC_PERSON"]));
            this.OrderItemCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ITEM_CODE"]));
            this.DeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_DATE"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.StorageQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["STORAGE_QTY"]));
            this.ProductedQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRODUCTED_QTY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.ProductType = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE"]));
            this.WorkorderCreateDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["WORKORDER_CREATE_DATE"]));
            this.OrderType = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_TYPE"]));
            this.IsAssembly = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ASSEMBLY"]));
            this.IsPrinted = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_PRINTED"]));
            this.IsMark = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_MARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdPlanOrderItemTable.Current;
            }
        }

        #region Perporty List
        public string PlanOrderItemId
        {
            get { return Convert.ToString(GetData(ProdPlanOrderItemTable.C_PLAN_ORDER_ITEM_ID)); }
            set { SetData(ProdPlanOrderItemTable.C_PLAN_ORDER_ITEM_ID, value); }
        }

        public string PlanOrderId
        {
            get { return Convert.ToString(GetData(ProdPlanOrderItemTable.C_PLAN_ORDER_ID)); }
            set { SetData(ProdPlanOrderItemTable.C_PLAN_ORDER_ID, value); }
        }

        public string BomId
        {
            get { return Convert.ToString(GetData(ProdPlanOrderItemTable.C_BOM_ID)); }
            set { SetData(ProdPlanOrderItemTable.C_BOM_ID, value); }
        }

        public string RelatedPlanOrderItemId
        {
            get { return Convert.ToString(GetData(ProdPlanOrderItemTable.C_RELATED_PLAN_ORDER_ITEM_ID)); }
            set { SetData(ProdPlanOrderItemTable.C_RELATED_PLAN_ORDER_ITEM_ID, value); }
        }

        public string ProductId
        {
            get { return Convert.ToString(GetData(ProdPlanOrderItemTable.C_PRODUCT_ID)); }
            set { SetData(ProdPlanOrderItemTable.C_PRODUCT_ID, value); }
        }

        public string BlueprintId
        {
            get { return Convert.ToString(GetData(ProdPlanOrderItemTable.C_BLUEPRINT_ID)); }
            set { SetData(ProdPlanOrderItemTable.C_BLUEPRINT_ID, value); }
        }

        public string TechnicPerson
        {
            get { return Convert.ToString(GetData(ProdPlanOrderItemTable.C_TECHNIC_PERSON)); }
            set { SetData(ProdPlanOrderItemTable.C_TECHNIC_PERSON, value); }
        }

        public string OrderItemCode
        {
            get { return Convert.ToString(GetData(ProdPlanOrderItemTable.C_ORDER_ITEM_CODE)); }
            set { SetData(ProdPlanOrderItemTable.C_ORDER_ITEM_CODE, value); }
        }

        public DateTime DeliveryDate
        {
            get { return Convert.ToDateTime(GetData(ProdPlanOrderItemTable.C_DELIVERY_DATE)); }
            set { SetData(ProdPlanOrderItemTable.C_DELIVERY_DATE, value); }
        }

        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(ProdPlanOrderItemTable.C_QTY)); }
            set { SetData(ProdPlanOrderItemTable.C_QTY, value); }
        }

        public decimal StorageQty
        {
            get { return Convert.ToDecimal(GetData(ProdPlanOrderItemTable.C_STORAGE_QTY)); }
            set { SetData(ProdPlanOrderItemTable.C_STORAGE_QTY, value); }
        }

        public decimal ProductedQty
        {
            get { return Convert.ToDecimal(GetData(ProdPlanOrderItemTable.C_PRODUCTED_QTY)); }
            set { SetData(ProdPlanOrderItemTable.C_PRODUCTED_QTY, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(ProdPlanOrderItemTable.C_STATUS)); }
            set { SetData(ProdPlanOrderItemTable.C_STATUS, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(ProdPlanOrderItemTable.C_REMARK)); }
            set { SetData(ProdPlanOrderItemTable.C_REMARK, value); }
        }

        public string ProductType
        {
            get { return Convert.ToString(GetData(ProdPlanOrderItemTable.C_PRODUCT_TYPE)); }
            set { SetData(ProdPlanOrderItemTable.C_PRODUCT_TYPE, value); }
        }

        public DateTime WorkorderCreateDate
        {
            get { return Convert.ToDateTime(GetData(ProdPlanOrderItemTable.C_WORKORDER_CREATE_DATE)); }
            set { SetData(ProdPlanOrderItemTable.C_WORKORDER_CREATE_DATE, value); }
        }

        public string OrderType
        {
            get { return Convert.ToString(GetData(ProdPlanOrderItemTable.C_ORDER_TYPE)); }
            set { SetData(ProdPlanOrderItemTable.C_ORDER_TYPE, value); }
        }

        public int IsAssembly
        {
            get { return Convert.ToInt32(GetData(ProdPlanOrderItemTable.C_IS_ASSEMBLY)); }
            set { SetData(ProdPlanOrderItemTable.C_IS_ASSEMBLY, value); }
        }

        public int IsPrinted
        {
            get { return Convert.ToInt32(GetData(ProdPlanOrderItemTable.C_IS_PRINTED)); }
            set { SetData(ProdPlanOrderItemTable.C_IS_PRINTED, value); }
        }

        public int IsMark
        {
            get { return Convert.ToInt32(GetData(ProdPlanOrderItemTable.C_IS_MARK)); }
            set { SetData(ProdPlanOrderItemTable.C_IS_MARK, value); }
        }

        #endregion
    }


}

